package org.example.wu_and_dian.config;

public class UserContext {
    private static final ThreadLocal<String> currentEmail = new InheritableThreadLocal<String>();
    private static final ThreadLocal<String> currentPassword = new InheritableThreadLocal<String>();

    public static void set(String Email, String password) {
        currentEmail.set(Email);
        currentPassword.set(password);
    }

    public static void clear() {
        currentEmail.remove();
        currentPassword.remove();
    }

    public static String getEmail() {
        return currentEmail.get();
    }

    public static String getPassword() {
        return currentPassword.get();
    }
}
